import tkinter as tk


ipx = 2

numList = ["1234", "123", "12345"]

top = tk.Tk()
top.title('03.py -- tk')


for num in numList:
    w = int((60 - 2*len(num)*2) / len(num))
    line = tk.Frame(top)
    line.pack(side = tk.TOP, fill = tk.X)
    for c in num:
        btn = tk.Button(line, text = c, width = w)        
        btn.pack(side = tk.LEFT, ipadx = ipx)

top.mainloop()